<!---
	Title:		Elders Program Database Intake Form
	Author:		Bruce Frick
	Purpose:	Intake form is used to input new Elders to the program and update existing one.
				Intake captures all useful information pretaining to Elders; ie name, address, emergency contacts, ect.
--->


<cfparam name="url.ElderID" default="0">

<cfoutput>
#CreateObject("component", "cfc.base").htmlHeader(
	"/jquery/ui-1.8.5/jquery-ui.min.js,js/intake.js", <!--- js links --->
	"css/style.css,
    /jquery/ui-1.8.5/themes/base/jquery-ui.css", <!--- css links --->
    "Elders Program - Intake Form",<!--- page title --->
    url.ElderID <!--- ElderID for session, used when user loads other tabs ---> )#
<cfset BASE = CreateObject("component", "cfc.base") />

<cfform id="myform" name="myform" >

<table width="100%" cellpadding="2" cellspacing="0" >
	<tbody class="header_title">
        <tr>
            <td width="60%">
            	<h2>Intake Application for Elder Services</h2>
            </td>
             <td  valign="bottom">
             	<!--- pagination, show/hides parts of the page to make the 
					  page small in appearence.  Uses js, intake.js--->
                <div id="Pagination" class="pagination">
                <span>Pages</span>
                <a href="##" class="current" id="page1">1</a>
                <a href="##" id="page2">2</a>
                <a href="##" id="page3">3</a>
                <a href="##" id="page4">4</a>
                </div>
            </td>
        </tr>
    </tbody>
</table>

<cfset QUERIES.elder = CreateObject("component", "cfc.queries").funcQryGetIntakeByID(url.ElderID) />
<cfinput type="hidden" id="ElderID" name="ElderID" value="#url.ElderID#" />
<cfset SESSION.ElderID = URL.ElderID />

<table width="99%" cellpadding="2" cellspacing="0" id="intake">
		<tbody class="body">
    	<tr>
        	<td>
            	<!--- Bad type ahead elder search.  User wanted this feature--->
            	<div>Elder Search:</div>
                <cfinput type="text" id="elder_search" name="elder_search" 
                	autosuggest='#CreateObject("component", "cfc.utilities").funcSearchLastNameSuggest()#'/>
            </td>
            <td>
            	<div>Elder Name:</div>
                <cfselect id="elder" name="elder">
                	<option value="-1">- New Elder -</option>
                <cfset QUERIES.eldersNoContact = CreateObject("component", "cfc.queries").funcQryAllEldersNoContacts() />
                <cfloop query="QUERIES.eldersNoContact">
                	<cfif url.ElderID eq ELDERLISTID>                    	
                    	<option value="#ELDERLISTID#" selected="selected">#LASTNAME#, #FIRSTNAME#</option>
                    <cfelse>
                    	<option value="#ELDERLISTID#">#LASTNAME#, #FIRSTNAME#</option>
                    </cfif>                	
                </cfloop>
                </cfselect>
            </td>
        	<td valign="top">
                <div>DOB:</div>
                <cfinput type="text" id="dob" name="dob" 
                	size="9" onBlur="validDate(this);" value="#QUERIES.elder.DOB#"  />
            </td>
            <td valign="top"><br />
            	<cfinput type="checkbox" id="new_intake" name="new_intake"  /> New
            </td>
            <td valign="top"><br />
            	<cfinput type="checkbox" id="edit_intake" name="edit_intake"  /> Update Application 
            </td>
        </tr>
    </tbody>
</table>

<table width="99%" cellpadding="2" cellspacing="0" id="intake">
	<tbody class="body" id="page_1">
        <tr>
        	<td class="black_spacer">A. Customer Information</td>
        </tr>    
        <tr>
			<td >
				<!---                                                                     --->
                <table cellpadding="2" cellspacing="0" width="98%" id="intake">
                    <tr>
                        <td>            	
                            <div>Last Name:</div>
                            <cfinput type="text" id="LastName" name="LastName" value="#QUERIES.elder.LastName#"   />
                        </td>
                        <td>            	
                            <div >First Name:</div>
                            <cfinput type="text" id="FirstName" name="FirstName"  value="#QUERIES.elder.FirstName#"/>
                        </td>
                        <td>            	
                            <div >Middle Initial:</div>
                            <cfinput type="text" id="MiddleInitial" name="MiddleInitial" size="5" 
                            	value="#QUERIES.elder.MiddleInitial#"/>
                        </td>
                        <td>            	
                            <div>Gender:</div> 
                            <cfselect id="Gender" name="Gender" >
                            	<option value="-1" >- Choose Gender -</option>
                                <option value="Male"<cfif QUERIES.elder.Gender eq "Male"> selected="selected"</cfif>>Male</option>
                                <option value="Female"<cfif QUERIES.elder.Gender eq "Female"> selected="selected"</cfif>>
                                	Female</option>
                            </cfselect>
                        </td>
                        <td>
                        	<div>Date of Contact:</div>
                            <cfif QUERIES.elder.DateOfContact NEQ "">
                				<cfinput type="text" id="DateOfContact" name="DateOfContact" 
                					value="#dateFormat(QUERIES.elder.DateOfContact,'mm/dd/yyyy')#" onBlur="validDate(this);"/>
                            <cfelse>
                            	<cfinput type="text" id="DateOfContact" name="DateOfContact" 
                					value="#dateFormat(Now(),'mm/dd/yyyy')#" onBlur="validDate(this);"/>
                            </cfif>
                        </td>
                    </tr>
                 </table>
                 <!---                                                                     --->            
                            
				 <!---                                                                     --->
                 <table cellpadding="2" cellspacing="0" width="98%" id="intake">
                    <tr>
                        <td>            	
                            <div>Street Address:</div>
                            <cfinput type="text" id="Address" name="Address" 
                                  value="#QUERIES.elder.Address#" />
                        </td>
                        <td>            	
                            <div>Apt/SpaceNo:</div>
                            <cfinput type="text" id="AptSpaceNo" name="AptSpaceNo" 
                                  value="#QUERIES.elder.AptSpaceNo#" />
                        </td>
                        <td>            	
                            <div>City:</div>
                            <cfinput type="text" id="City" name="City" 
                                  value="#QUERIES.elder.City#" />
                        </td>
                        <td>            	
                            <div>State:</div>
                            <cfinput type="text" id="State" name="State" 
                                  size="5" value="#QUERIES.elder.State#"/>
                        </td>
                        <td>            	
                            <div>Zip:</div>
                            <cfinput type="text" id="Zip" name="Zip" 
                                  size="10" value="#QUERIES.elder.Zip#"/>
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="5">
                        	<cfinput type="button" id="copy_address" name="copy_address"  value="Copy Address" />
                        </td>
                    </tr>
                    <tr>
                        <td>            	
                            <div>Mail Address:</div>
                            <cfinput type="text" id="MailingAddress" name="MailingAddress" 
                                  value="#QUERIES.elder.MailingAddress#" />
                        </td>
                        <td>            	
                            <div>Mail Apt/SpaceNo:</div>
                            <cfinput type="text" id="MailingAptSpaceNo" name="MailingAptSpaceNo" 
                                  value="#QUERIES.elder.MailingAptSpaceNo#" />
                        </td>
                        <td>            	
                            <div>Mail City:</div>
                            <cfinput type="text" id="MailingCity" name="MailingCity" 
                                  value="#QUERIES.elder.MailingCity#" />
                        </td>
                        <td>            	
                            <div>Mail State:</div>
                            <cfinput type="text" id="MailingState" name="MailingState" 
                                  size="5" value="#QUERIES.elder.MailingState#" />
                        </td>
                        <td>            	
                            <div>Mail Zip:</div>
                            <cfinput type="text" id="MailingZip" name="MailingZip" 
                                  size="10" value="#QUERIES.elder.MailingZip#" />
                        </td>
                    </tr>
                 </table>
                 <!---                                                                     --->  
                 
                 <!---                                                                     --->
                 <table cellpadding="2" cellspacing="0" id="intake">
                    <tr>
                    	<td>            	
                            <div>Phone: </div>
                            <cfinput type="text" id="HomePhone" name="HomePhone" 
                                size="15"  value="#QUERIES.elder.HomePhone#"/>
                        </td>
                        <td>            	
                            <div>SSN:</div>
                            <cfinput type="text" id="SSN" name="SSN" 
                                size="11"  value="#QUERIES.elder.SSN#"/>
                        </td> 
                        <td>            	
                            <div>TTCM:</div>
                            <cfselect id="TTCM" name="TTCM" >
                            	<option value="0" <cfif QUERIES.elder.TTCM eq false>selected="selected"</cfif>>No</option>
                                <option value="1" <cfif QUERIES.elder.TTCM eq true>selected="selected"</cfif>>Yes</option>
                            </cfselect>
                            
                        </td>  
                        <td>            	
                            <div>CaseID:</div>
                            <cfinput name="SignatureCaseNumber" value="#QUERIES.elder.SignatureCaseNumber#" />
                            
                        </td>  
                        <td>            	
                            <div>Provider:</div>
                            <cfset QUERIES.providers = CreateObject("component", "cfc.utilities").funcGetDLProviders() />
							<cfselect name="ProviderID">
                                <option value="-1" > </option>
                                <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                    <option value="#QUERIES.providers[i].RosettaID#" 
                                    <cfif QUERIES.elder.ProviderID eq QUERIES.providers[i].RosettaID> selected="selected"</cfif> > 
                                    #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#</option>
                                </cfloop>
                            </cfselect>                            
                        </td>
                        <!--- <td>
                            <Div>Acuity:</div>
                            <cfset QUERIES.acuityLevels = CreateObject('component', 'cfc.queries').funcQryAllAcuityLevels("All") />
                            <cfselect id="PriorityID" name="PriorityID" >
	                            <option value="-1" > </option>                            
	                            <cfloop query="QUERIES.acuityLevels">
		                            <option value="#PriorityID#" <cfif QUERIES.elder.PriorityID eq PriorityID>selected="selected"</cfif>>
		                                #PriorityName#
		                            </option>
	                            </cfloop>
                            </cfselect>
                        </td> --->                  
                    </tr>
                 </table>
                 <!---                                                                     --->             
             </td>
        </tr>
        <tr>
        	<td  class="black_spacer">B. Legal Representative</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Legal Representative --->
                <table cellpadding="2"cellspacing="0" id="intake">
                	<tbody>
                    	<tr>
							<td valign="top">
                            	<div>Name:</div>
                            	<cfinput type="text" id="LegalRepName" name="LegalRepName" size="30" 
                                value="#QUERIES.elder.LegalRepName#"/>
							</td>
                            <td valign="top">
                            	<div>Home Phone: </div>
                                <cfinput type="text" id="LegalRepHomePhone" size="30" name="LegalRepHomePhone" 
                                value="#QUERIES.elder.LegalRepHomePhone#"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                            	<div>Cell Phone: </div>
                                <cfinput type="text" id="LegalRepCellPhone" size="30" name="LegalRepCellPhone" 
                                value="#QUERIES.elder.LegalRepCellPhone#"/>                           
                                
                            </td>
							<td valign="top">
                            	<div>Relationship:</div>
                            	<cfinput type="text" id="LegalRepRelationship" name="LegalRepRelationship" size="30" 
                                value="#QUERIES.elder.LegalRepRelationship#"/>
							</td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Legal Representative --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">C. Emergency Contacts</td>
        </tr>
        <tr>
			<td>            	
                <!---                                                           --->
                <table cellpadding="2" cellspacing="0" style="float:left"  width="35%" id="intake">
                	<tbody>
                    	<tr>
							<td>
                            	<div>Name:</div>
                            	<cfinput type="text" id="EmergencyContactName" name="EmergencyContactName" size="30" 
                                value="#QUERIES.elder.EmergencyContactName#"/>
							</td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Relationship: </div>
                                <cfinput type="text" id="EmergencyContactRelationship" name="EmergencyContactRelationship" size="30" 
                                value="#QUERIES.elder.EmergencyContactRelationship#"/>
                            </td>
                        </tr>
                        <tr>
							<td>
                            	<div>Home Phone:</div>
                            	<cfinput type="text" id="EmergencyContactHomePhone" name="EmergencyContactHomePhone" size="30"  
                                value="#QUERIES.elder.EmergencyContactHomePhone#"/>
							</td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Cell Phone:</div>
                                <cfinput type="text" id="EmergencyContactCellPhone" name="EmergencyContactCellPhone" size="30" 
                                value="#QUERIES.elder.EmergencyContactCellPhone#"/>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!---                                                           --->
               
               <!---                                                           --->
                <table cellpadding="2" cellspacing="0" style="float:left" id="intake">
                	<tbody>
                    	<tr>
							<td>
                            	<div>Name:</div>
                            	<cfinput type="text" id="EmergencyContactName2" name="EmergencyContactName2" size="30" 
                                value="#QUERIES.elder.EmergencyContactName2#"/>
							</td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Relationship: </div>
                                <cfinput type="text" id="EmergencyContactRelationship2" name="EmergencyContactRelationship2" 
                                	size="30" value="#QUERIES.elder.EmergencyContactRelationship2#"/>
                            </td>
                        </tr>
                        <tr>
							<td>
                            	<div>Home Phone:</div>
                            	<cfinput type="text" id="EmergencyContactHomePhone2" name="EmergencyContactHomePhone2" size="30"  
                                value="#QUERIES.elder.EmergencyContactHomePhone2#"/>
							</td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Cell Phone:</div>
                                <cfinput type="text" id="EmergencyContactCellPhone2" name="EmergencyContactCellPhone2" size="30" 
                                value="#QUERIES.elder.EmergencyContactCellPhone2#"/>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!---                                                           --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">D. Current Employment Status</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Current Employment Status --->
                <table cellpadding="2" cellspacing="0" id="intake">
                	<tbody>
                    	<tr>
							<td>
                            	<div>Employment Status:</div> 
                            	<cfselect id="EmploymentStatus" name="EmploymentStatus" >
                                <cfset emp_status = QUERIES.elder.EmploymentStatus />
                            		<option value="-1" selected="selected">- Choose Status -</option>
                                	<option value="Employed"<cfif emp_status eq "Employed"> selected="selected"</cfif>>
                                    	Employed
                                    </option>
                                	<option value="Retired"<cfif emp_status eq "Retired"> selected="selected"</cfif>>Retired</option>
                                    <option value="Not Working"<cfif emp_status eq "Not Working"> selected="selected"</cfif>>
                                    	Not Working
                                    </option>
                           		</cfselect>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Current Employment Status --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">E. Primary Care Provider Information</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Primary Care Provider Information --->
                <table cellpadding="2" cellspacing="0" width="75%" id="intake">
                	<tbody>
                    	<tr>
							<td>
                                <div>Provider:</div>
                                <cfinput type="text" id="ProviderName" name="ProviderName" value="#QUERIES.elder.ProviderName#" />
							</td>
                            <td>
                            	<div>Phone Number: </div>
                                <cfinput type="text" id="ProviderPhoneNumber" name="ProviderPhoneNumber" 
                                value="#QUERIES.elder.ProviderPhoneNumber#" size="30" />
                            </td>
                            <td>
                            	<div>Clinic: </div>
                                <cfinput type="text" id="ProviderClinic" name="ProviderClinic" 
                                value="#QUERIES.elder.ProviderClinic#" />
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Primary Care Provider Information --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">F. ANCSA Regional Corporation</td>
        </tr>
        <tr>
			<td >
				<!--- inner table ANCSA Regional Corporation --->
                <table cellpadding="2" cellspacing="0" id="intake">
                	<tbody>
                    	<tr>
							<td>
                            	<div>Regional Corp:</div>
                            	<cfselect id="RegionalCorp" name="RegionalCorp" >
                            	<option value="-1" selected="selected">- Choose Regional Corp -</option>
								<cfset QUERIES.regionalCorps = CreateObject("component", "cfc.queries").funcQryAllRegionalCorps() />
                            	<cfloop query="QUERIES.regionalCorps">
                                <option value="#RegionalCorpID#"<cfif QUERIES.elder.RegionalCorp eq RegionalCorpID> selected="selected"</cfif>>
                                	#RegionalCorp#
                                </option>
                            	</cfloop>
                            	</cfselect>
							</td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table ANCSA Regional Corporation --->
            </td>
        </tr>
    </tbody>
    <tbody class="body" id="page_2">
        <tr>
        	<td class="black_spacer">G. Ethnicity</td>
        </tr>
        <tr>
			<td>
				<!--- inner table Ethnicity --->
                <table cellpadding="2" cellspacing="0" width="60%" id="intake">
                	<tbody>
                    	<tr>
							<td>
                                <div>Ethnicity:</div>
								<cfset eth = QUERIES.elder.Ethnicity />
                                <cfset QUERIES.ethnicity = CreateObject("component", "cfc.queries").funcQryAllEthnicity() />
                                <cfselect id="Ethnicity" name="Ethnicity" >                                
                                <option value="-1" selected="selected">- Choose Ethnicity -</option>                                
                                <cfloop query="QUERIES.ethnicity">
                                    <option value="#QUERIES.ethnicity.EthnicityID#" 
									<cfif eth eq QUERIES.ethnicity.EthnicityID> selected="selected"</cfif> >
                                        #QUERIES.ethnicity.Ethnicity#
                                    </option>
                                </cfloop>
                                </cfselect>
							</td>
                            <td>
                            	<div>Other - Please Specify:</div> 
                                <cfinput type="text" id="EthnicityOther" name="EthnicityOther" 
                                value="#QUERIES.elder.EthnicityOther#" />
                            </td>
                        </tr>
                        <tr>
                        	<td>
                            	<div>Primary Language:</div> 
                                <cfinput type="text" id="PrimaryLanguage" name="PrimaryLanguage"
                                value="#QUERIES.elder.PrimaryLanguage#" />
                            </td>
                            <td >
                            	<div>Secondary Language:</div> 
                                <cfinput type="text" id="SecondaryLanguage" name="SecondaryLanguage" 
                                value="#QUERIES.elder.SecondaryLanguage#"/>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Ethnicity --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer" >H. Current Living Arrangements</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Current Living Arrangements --->
                <table cellpadding="2" cellspacing="0" width="80%" id="intake">
                	<tbody>
                    	<tr>
                        	<td >
                            	<div>Raising Grandchildren:</div>
                                <cfselect id="RaisingGrandchildren" name="RaisingGrandchildren">
                                	<option value="0"<cfif QUERIES.elder.RaisingGrandchildren eq 0> selected="selected"</cfif>>
                                    	No
                                    </option>
                                    <option value="1"<cfif QUERIES.elder.RaisingGrandchildren eq 1> selected="selected"</cfif>>
                                    	Yes
                                    </option>
                                </cfselect>
                            </td>
                            <td>
                            	<div>If Yes, how many: </div>
                                <cfinput type="text" id="Grandchildren" name="Grandchildren" size="5" 
                                value="#QUERIES.elder.Grandchildren#"/>
                            </td>
                            <td >
                            	<div>Ages: </div>
                                <cfinput type="text" id="GrandchildrenAges" name="GrandchildrenAges" 
                                value="#QUERIES.elder.GrandchildrenAges#" />
                            </td>
                        </tr>
                        <tr>
                        	<td>
                            	<div>Housing facility?:</div>
                                <cfselect id="HousingType" name="HousingType">
                                	<option value="House"<cfif QUERIES.elder.HousingType eq "House"> selected="selected"</cfif>>
                                    	House
                                    </option>
                                    <option value="Apartment"
									<cfif QUERIES.elder.HousingType eq "Apartment"> selected="selected"</cfif>>
                                    	Apartment
                                    </option>
                                    <option value="Mobile Home"
									<cfif QUERIES.elder.HousingType eq "Mobile Home"> selected="selected"</cfif>>
                                    	Mobile Home
                                    </option>
                                    <option value="Other"<cfif QUERIES.elder.HousingType eq "Other"> selected="selected"</cfif>>
                                    	Other
                                    </option>
                                </cfselect> 
                            </td>
                            <td colspan="2">
                            	<div>Other:</div> 
                                <cfinput type="text" id="HousingTypeOther" name="HousingTypeOther"
                                value="#QUERIES.elder.HousingTypeOther#"   />
                            </td>
                        </tr>
                        <tr>
                        	<td >
                            	<div>Do you have any pets?:</div>
                                <cfselect id="Pets" name="Pets">
                                	<option value="0"<cfif QUERIES.elder.Pets eq 0> selected="selected"</cfif>>No</option>
                                    <option value="1"<cfif QUERIES.elder.Pets eq 1> selected="selected"</cfif>>Yes</option>
                                </cfselect>
                            </td>
                            <td colspan="2">
                            	<div>If Yes, type?:</div> 
                                <cfinput type="text" id="PetsType" name="PetsType" size="50"
                                value="#QUERIES.elder.PetsType#" />
                            </td>
                        </tr>
                        <tr>
                        	<td>
                            	<div>Household Smoker?:</div>
                                <cfselect id="HouseHoldSmoker" name="HouseHoldSmoker">
                                	<option value="0"<cfif QUERIES.elder.HouseHoldSmoker eq 0> selected="selected"</cfif>>No</option>
                                    <option value="1"<cfif QUERIES.elder.HouseHoldSmoker eq 1> selected="selected"</cfif>>Yes</option>
                                </cfselect>
                            </td>
                            <td>
                            	<div>If Yes, Inside the home:</div>
                            	<cfselect id="HouseHoldSmokerInHome" name="HouseHoldSmokerInHome">
                                	<option value="0"<cfif QUERIES.elder.HouseHoldSmokerInHome eq 0> selected="selected"</cfif>>
                                    	No
                                    </option>
                                    <option value="1"<cfif QUERIES.elder.HouseHoldSmokerInHome eq 1> selected="selected"</cfif>>
                                    	Yes
                                    </option>
                                </cfselect>
                             </td>
                             <td>
                            	<div>If Yes, Outdoors only:</div>
                            	<cfselect id="HouseHoldSmokerOutdoors" name="HouseHoldSmokerOutdoors">
                                	<option value="0"<cfif QUERIES.elder.HouseHoldSmokerOutdoors eq 0> selected="selected"</cfif>>
                                    	No
                                    </option>
                                    <option value="1"<cfif QUERIES.elder.HouseHoldSmokerOutdoors eq 1> selected="selected"</cfif>>
                                    	Yes
                                    </option>
                                </cfselect>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Current Living Arrangements --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">I. Transportation</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Transportation --->
                <table cellpadding="2" cellspacing="0" id="intake">
                	<tbody>
                    	<tr>
                        	<td>
								<div>Usual Means of Transportation: </div>
                                <cfinput type="text" id="MeansOfTransport" name="MeansOfTransport" size="80"
                                value="#QUERIES.elder.MeansOfTransport#"  />
                            </td>
                        </tr>
                        <tr>
                        	<td>
                            	<div>Alternate Means of Transportation: </div>
                                <cfinput type="text" id="AltMeansOfTransport" name="AltMeansOfTransport" size="80" 
                                value="#QUERIES.elder.AltMeansOfTransport#"/>
                            </td>
                        </tr>
                        <tr>
                        	<td>
                            	<div>Do you require Transportation for Essential Services from the Elder Program: </div>
                               	<cfselect id="RequireTransport" name="RequireTransport">
                                	<option value="0"<cfif QUERIES.elder.RequireTransport eq 0> selected="selected"</cfif>>No</option>
                                    <option value="1"<cfif QUERIES.elder.RequireTransport eq 1> selected="selected"</cfif>>Yes</option>
                                </cfselect> 
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Transportation --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">J. Current Use of Assitive/Support Device</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Current Use of Assitive/Support Device --->
                <table cellpadding="2" cellspacing="0" id="intake">
                	<tbody>
                    	<tr>
                        	<td>
                            	<div>Device:</div>
                            	<cfselect id="AssitiveDevice" name="AssitiveDevice">
                                <cfset assistd = QUERIES.elder.AssitiveDevice />
                                	<option value="None"<cfif assistd eq 'None'> selected="selected"</cfif>>None</option>
                                    <option value="Cane"<cfif assistd eq 'Cane'> selected="selected"</cfif>>Cane</option>
                                    <option value="Walker"<cfif assistd eq 'Walker'> selected="selected"</cfif>>Walker</option>
                                    <option value="Wheelchair"<cfif assistd eq 'Wheelchair'> selected="selected"</cfif>>Wheelchair</option>
                                    <option value="Oxygen"<cfif assistd eq 'Oxygen'> selected="selected"</cfif>>Oxygen</option>
                                    <option value="Other"<cfif assistd eq 'Other'> selected="selected"</cfif>>Other</option>
                                </cfselect>
                            </td>
                            <td>
                            	<div>Other: </div>
                                <cfinput type="text" id="AssitiveDeviceOther" name="AssitiveDeviceOther"
                                value="#QUERIES.elder.AssitiveDeviceOther#"/>
                            </td>
                            <td>
                            	<div>Need Vehicle Lift:</div>
                                <cfselect id="NeedVehicleLift" name="NeedVehicleLift">
                                	<option value="0"<cfif QUERIES.elder.NeedVehicleLift eq 0> selected="selected"</cfif>>No</option>
                                    <option value="1"<cfif QUERIES.elder.NeedVehicleLift eq 1> selected="selected"</cfif>>Yes</option>
                                </cfselect>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Current Use of Assitive/Support Device --->
            </td>
        </tr>
    </tbody>
    <tbody class="body" id="page_3" id="intake">
        <tr>
        	<td class="black_spacer">K. Instrumental Activities of Daily Living (IADL)</td>
        </tr>
        <tr>
			<td >
            	<div>
                Choose yes or no if Elder lives in an Assisted Living Facility or Nursing Home and skip to Section L.
                <cfselect id="AssistedLivingFacility" name="AssistedLivingFacility" >
                	<option value="0" <cfif QUERIES.elder.AssistedLivingFacility eq false >selected="selected"</cfif>>No</option>
                    <option value="1" <cfif QUERIES.elder.AssistedLivingFacility eq true >selected="selected"</cfif>>Yes</option>
                </cfselect>  
                </div>				
            </td>
        </tr>
        <tr>
            <td>
                <!--- inner table Instrumental Activities of Daily Living (IADL) --->
                <table cellpadding="2" cellspacing="2" id="iadl" >
                    <tbody>
                        <tr>
                            <td>
                                <cfset IADLObj = {
                                    1 = "Independent (1 Point)",
                                    2 = "Independent, with great difficulty (2 Points)",
                                    3 = "With assistance from a helper (3 Points)",
                                    4 = "Unable to complete, helper does all of the work (4 Points)" 
                                } />
                                <div>Preparing Meals:</div>
                                <cfselect name="PreparingMeals">
                                    <cfloop from="1" to="#StructCount(IADLObj)#" index="i" >
                                        <option value="#i#" <cfif i EQ QUERIES.elder.PreparingMeals >selected="selected"</cfif>>#IADLObj[i]#</option>                                    
                                    </cfloop>
                                </cfselect>
                            <td>
                                <div>How does the customer currently manage:</div>
                                <cfinput type="text" name="PreparingMealsManage" size="50" value="#QUERIES.elder.PreparingMealsManage#"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>Doing Housework:</div>
                                <cfselect name="DoingHouseWork">
                                    <cfloop from="1" to="#StructCount(IADLObj)#" index="i" >
                                        <option value="#i#" <cfif i EQ QUERIES.elder.DoingHouseWork >selected="selected"</cfif>>#IADLObj[i]#</option>                                    
                                    </cfloop>
                                </cfselect>
                            </td>
                            <td>
                                <div>How does the customer currently manage:</div>
                                <cfinput type="text" name="DoingHouseWorkManage" size="50" value="#QUERIES.elder.DoingHouseWorkManage#"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>Doing Laundry:</div>
                                <cfselect name="DoingLaundry">
                                    <cfloop from="1" to="#StructCount(IADLObj)#" index="i" >
                                        <option value="#i#" <cfif i EQ QUERIES.elder.DoingLaundry >selected="selected"</cfif>>#IADLObj[i]#</option>                                    
                                    </cfloop>
                                </cfselect>
                            </td>
                            <td>
                                <div>How does the customer currently manage:</div>
                                <cfinput type="text" name="DoingLaundryManage" size="50" value="#QUERIES.elder.DoingLaundryManage#"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>Doing Shopping:</div>
                                <cfselect name="DoingShopping">
                                    <cfloop from="1" to="#StructCount(IADLObj)#" index="i" >
                                        <option value="#i#" <cfif i EQ QUERIES.elder.DoingShopping >selected="selected"</cfif>>#IADLObj[i]#</option>                                    
                                    </cfloop>
                                </cfselect>
                            </td>
                            <td>
                                <div>How does the customer currently manage:</div>
                                <cfinput type="text" name="DoingShoppingManage" size="50" value="#QUERIES.elder.DoingShoppingManage#"/>
                           </td>
                        </tr>
                        <tr>
                            <td>
                                <!--- inner table Instrumental Activities of Daily Living (IADL) --->
                               <div ><!---class="instructions"--->
                                   <div>
                                        Acuity Level:
                                        <cfset QUERIES.acuityLevels = CreateObject('component', 'cfc.queries').funcQryAllAcuityLevels("All") />
                                        <cfselect name="PriorityID" >
			                                <option value="-1" > </option>                            
			                                <cfloop query="QUERIES.acuityLevels">
			                                    <option value="#PriorityID#" <cfif QUERIES.elder.PriorityID eq PriorityID>selected="selected"</cfif>>
			                                        #PriorityName#
			                                    </option>
			                                </cfloop>
			                            </cfselect>
                                        <br />
                                        <!--- <span id="acuity_totals"></span> --->
                                   </div>
                               </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">L. Informal Support / F.C.S.I</td>
        </tr>
        <tr>
			<td>
             	1. Does the customer have any family members or informal support or caregivers?
		        <Cfset QUERIES.caregivers = CreateObject("component", "cfc.queries").funcQrySelectCaregivers(url.ElderID) />
                 <div>
                 	Caregivers: <span id="caregivers_list">
                 	<cfloop query="QUERIES.caregivers" >
                     	&nbsp;&nbsp;
                     	<a href="##" id="cg_#QUERIES.caregivers.CareGiverID#">#QUERIES.caregivers.LastName#, #QUERIES.caregivers.FirstName#</a>
                     </cfloop>	
                     </span>
                 </div>
                 <br />
                 <cfinput type="button" id="add_caregiver" name="add_caregiver" value="Add Caregiver" />                    
                 <cfinput type="button" id="save_caregiver" name="save_caregiver" value="Save Caregiver" class="hidden" />
                 <cfinput type="button" id="delete_caregiver" name="delete_caregiver" value="Delete Caregiver" class="hidden" />
                 <cfinput type="hidden" name="cg_CareGiverID" id="cg_CareGiverID" />
				<div id="caregiver" class="hidden">
                <table cellpadding="2" cellspacing="0" width="98%" id="intake"> 
                    	<tr>
                        	<td>            	
                                    <div>Last Name:</div>
                                    <cfinput type="hidden" id="caregiver_id" name="caregiver1_id" value="" />
                                    <cfinput type="text" id="cg_LastName" name="cg_LastName" 
                                          />
                                </td>
                                <td>            	
                                    <div>First Name:</div>
                                    <cfinput type="text" id="cg_FirstName" name="cg_FirstName" 
                                          />
                                </td>
                                <td>            	
                                    <div>Address:</div>
                                    <cfinput type="text" id="cg_Address" name="cg_Address" 
                                          />
                                </td>
                                <td>
                                    <div>City:</div>
                                    <cfinput type="text" id="cg_City" name="cg_City" 
                                          />
                                </td>                 
                                <td>            	
                                    <div>State:</div>
                                    <cfinput type="text" id="cg_State" name="cg_State" 
                                           size="5"/>
                                </td>
                                <td>            	
                                    <div>Zip:</div>
                                    <cfinput type="text" id="cg_Zip" name="cg_Zip" 
                                          size="10" />
                                </td>
                            </tr>
                            <tr>
                                <td>            	
                                    <div>Phone:</div>
                                    <cfinput type="text" id="cg_Phone" name="cg_Phone" 
                                          />
                                </td>                    
                                <td>            	
                                    <div>Relationship to Elder:</div>
                                    <cfinput type="text" id="cg_RelationshiptoElder" name="cg_RelationshiptoElder" 
                                          />
                                </td>
                                <td>
                                    <div>Employment Status:</div> 
                                        <cfselect id="cg_EmploymentStatus" name="cg_EmploymentStatus" >
                                            <option value="-1" selected="selected">- Choose Status -</option>
                                            <option value="Employed">Employed</option>
                                            <option value="Retired">Retired</option>
                                            <option value="Not Working">Not Working</option>
                                        </cfselect>
                                </td>
                                <td>            	
                                    <div>Household Status:</div>
                                    <cfselect id="cg_HouseholdStatus" name="cg_HouseholdStatus">
                                        <option value="Shared" selected="selected">Shared</option>
                                        <option value="Separate">Separate</option>
                                    </cfselect>
                                </td>
                                <td colspan="2">            	
                                    <div>Caregiver Contact:</div>
                                    <cfinput type="text" id="cg_Contact" name="cg_Contact" 
                                          size="5" />
                                    Per: 
                                    <cfselect id="cg_ContactFrequency" name="cg_ContactFrequency">
                                        <option value="Day" selected="selected">Day</option>
                                        <option value="Week">Week</option>
                                        <option value="Month">Month</option>
                                        <option value="Year">Year</option>
                                    </cfselect>
                                </td>
                            </tr> 
                     
                </table> 
                
                </div>
                <br />
                <br />
                
                	2.  If the indivdual(s) that usually assist you are not available, are there other 
                   		individuals who will assist you if asked?  If yes, please list below.
                        <br />                   
                
                <cfset QUERIES.support = CreateObject("component", "cfc.queries").funcQrySelectInformalSupport(url.ElderID) />
                <cfinput type="hidden" name="InformalSupportID" value="#QUERIES.support.InformalSupportID#" />
                <div id="not_available">
                <!---                                1                                     --->
               
                <table cellpadding="2" cellspacing="0" id="intake">
                    <tr>
                        <td>            	
                            <div>Name:</div>
                            <cfinput type="text" id="NameUsuallyAssists1" name="NameUsuallyAssists1" value="#QUERIES.support.NameUsuallyAssists1#" />
                        </td>
                        <td>            	
                            <div>Phone Number:</div>
                            <cfinput type="text" id="UsuallyAssistsPhone1" name="UsuallyAssistsPhone1" value="#QUERIES.support.UsuallyAssistsPhone1#" />
                        </td>
                    </tr>
                 </table>
                 </div>
				<!---                                1                                    --->
                <div id="not_available">
                <!---                                2                                     --->
               
                <table cellpadding="2" cellspacing="0" id="intake">
                    <tr>
                        <td>            	
                            <div>Name:</div>
                            <cfinput type="text" id="NameUsuallyAssists2" name="NameUsuallyAssists2" value="#QUERIES.support.NameUsuallyAssists2#" />
                        </td>
                        <td>            	
                            <div>Phone Number:</div>
                            <cfinput type="text" id="UsuallyAssistsPhone2" name="UsuallyAssistsPhone2" value="#QUERIES.support.UsuallyAssistsPhone2#" />
                        </td>
                    </tr>
                 </table>
                 </div>
				<!---                                2                                    --->
                <div id="not_available">
                <!---                                3                                     --->
               
                <table cellpadding="2" cellspacing="0" id="intake">
                    <tr>
                        <td>            	
                            <div>Name:</div>
                            <cfinput type="text" id="NameUsuallyAssists3" name="NameUsuallyAssists3" value="#QUERIES.support.NameUsuallyAssists3#" />
                        </td>
                        <td>            	
                            <div>Phone Number:</div>
                            <cfinput type="text" id="UsuallyAssistsPhone3" name="UsuallyAssistsPhone3" value="#QUERIES.support.UsuallyAssistsPhone3#" />
                        </td>
                    </tr>
                 </table>
                 </div>
				<!---                                3                                    --->
                <div id="not_available">
                <!---                                4                                     --->
               
                <table cellpadding="2" cellspacing="0" id="intake">
                    <tr>
                        <td>            	
                            <div>Name:</div>
                            <cfinput type="text" id="NameUsuallyAssists4" name="NameUsuallyAssists4" value="#QUERIES.support.NameUsuallyAssists4#" />
                        </td>
                        <td>            	
                            <div>Phone Number:</div>
                            <cfinput type="text" id="UsuallyAssistsPhone4" name="UsuallyAssistsPhone4" value="#QUERIES.support.UsuallyAssistsPhone4#" />
                        </td>
                    </tr>
                 </table>
                 </div>
				<!---                                4                                    --->
                <div>
                	3. Are there any services you need that your informal supports cannot provide?<br />
                    <cftextarea id="ServicesCannotProvide" name="ServicesCannotProvide"  cols="75">
                    	#QUERIES.elder.ServicesCannotProvide#
                    </cftextarea>
                </div>
                </div>
            </td>
        </tr>
    </tbody>
    <tbody class="body" id="page_4">
        <tr>
        	<td class="black_spacer">M. Formal Support Service</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Formal Support Service --->
                <table cellpadding="2" cellspacing="0" id="fss">
                	<tbody>
                    	<tr>
                        	<td colspan="2">
                            	Is the Customer Receiving the Following Services from Another Agency?
                            </td>
                        </tr>
                    	<tr>
                            <td>
                            	<div>Adult Day Serivces Agency:</div>
                            	<cfinput type="text" id="DayServiceAgency" name="DayServiceAgency" 
                                 size="30"  value="#QUERIES.elder.DayServiceAgency#"/>
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="DayServiceAgencyFrequency" name="DayServiceAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.DayServiceAgencyFrequency#" />
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Personal Care Attendent Agency:</div>
                            	<cfinput type="text" id="PersonalCareAgency" name="PersonalCareAgency" 
                                 size="30" value="#QUERIES.elder.PersonalCareAgency#" />
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="PersonalCareAgencyFrequency" name="PersonalCareAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.PersonalCareAgencyFrequency#" />
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Home Delivered Meals Agency:</div>
                            	<cfinput type="text" id="HomeDeliveredMealsAgency" name="HomeDeliveredMealsAgency" 
                                 size="30" value="#QUERIES.elder.HomeDeliveredMealsAgency#"/>
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="HomeDeliveredMealsAgencyFrequency" name="HomeDeliveredMealsAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.HomeDeliveredMealsAgencyFrequency#"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Home Health Agency:</div>
                            	<cfinput type="text" id="HomeHealthAgency" name="HomeHealthAgency" 
                                 size="30" value="#QUERIES.elder.HomeHealthAgency#" />
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="HomeHealthAgencyFrequency" name="HomeHealthAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.HomeHealthAgencyFrequency#" />
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Respite Care Agency:</div>
                            	<cfinput type="text" id="RespiteCareAgency" name="RespiteCareAgency" 
                                 size="30" value="#QUERIES.elder.RespiteCareAgency#"/>
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="RespiteCareAgencyFrequency" name="RespiteCareAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.RespiteCareAgencyFrequency#"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Transportation Agency:</div>
                            	<cfinput type="text" id="TransportationAgency" name="TransportationAgency" 
                                 size="30" value="#QUERIES.elder.TransportationAgency#"/>
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="TransportationAgencyFrequency" name="TransportationAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.TransportationAgencyFrequency#"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                            	<div>Other Agency:</div>
                            	<cfinput type="text" id="OtherAgency" name="OtherAgency" 
                                 size="30" value="#QUERIES.elder.OtherAgency#"/>
                            </td>
                            <td>                            
                                <div>Frequency:</div>
                                <cfinput type="text" id="OtherAgencyFrequency" name="OtherAgencyFrequency" 
                                	size="20" value="#QUERIES.elder.OtherAgencyFrequency#"/>
                                
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Formal Support Service --->
            </td>
        </tr>
        <tr>
        	<td class="black_spacer">N. Health Insurance</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Health Insurance --->
                <table cellpadding="2" cellspacing="0" width="98%" id="intake">
                	<tbody>
                    	<tr>
                        	<td>
                            	<div>Medicare, Part A: </div>
                                <cfinput type="text" id="MedicarePartANo" name="MedicarePartANo"
                                 value="#QUERIES.elder.MedicarePartANo#" />
                            </td>
                            <td>
                            	<div>Medicare, Part B:</div>
                                <cfinput type="text" id="MedicarePartBNo" name="MedicarePartBNo"
                                value="#QUERIES.elder.MedicarePartBNo#"/>
                            </td>
                            <td>
                            	<div>Medicare, Part D:</div> 
                                <cfinput type="text" id="MedicarePartDNo" name="MedicarePartDNo"
                                value="#QUERIES.elder.MedicarePartDNo#"/>
                            </td>
                          
                            <td>
                            	<div>Medicaid:</div>
                                <cfinput type="text" id="MedicaidNo" name="MedicaidNo" 
                                value="#QUERIES.elder.MedicaidNo#"/>
                            </td>
                            <td>
                            	<div>Private:</div>
                                <cfinput type="text" id="PrivateInsuranceNo" name="PrivateInsuranceNo"
                                value="#QUERIES.elder.PrivateInsuranceNo#"/>
                            </td>
                        </tr>
                        <tr>
                        	<td colspan="5">
                            	<div>Comments / Other Information:</div>
                                <cftextarea id="InsuranceComments" name="InsuranceComments"  cols="92">
                                	#QUERIES.elder.InsuranceComments#
                                </cftextarea>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Health Insurance--->
            </td>
        </tr>
   		<tr>
        	<td class="black_spacer">O. Signatures</td>
        </tr>
        <tr>
			<td >
				<!--- inner table Signatures --->
                <table cellpadding="0" cellspacing="0" width="99%" id="intake">
                	<tbody>
                    	<tr>
                        	<td>                           
                            	<div id="ElderSignature">Elder Signature:</div>                           
                                <cfselect id="ElderSignature" name="ElderSignature"  >
                                    <option value="no" <cfif QUERIES.elder.ElderSignature eq 'no'>selected=selected</cfif>>No</option>
                                    <option value="yes" <cfif QUERIES.elder.ElderSignature eq 'yes'>selected=selected</cfif>>Yes</option>
                                </cfselect>
                                <cfif QUERIES.elder.ElderSignature neq "" or QUERIES.elder.ElderSignature eq 'no'>
                                    <cfset ElderSignDate = dateFormat(QUERIES.elder.ElderSignatureDate, 'mm/dd/yyyy') />
                                <cfelse>
                                    <cfset ElderSignDate = dateFormat(now(), 'mm/dd/yyyy') />
                                </cfif>
                                <cfinput type="text" name="ElderSignatureDate" value="#ElderSignDate#" />
                            </td>
                            <td>
                            	<div id="StaffSignature">Staff Signature:</div>
                                <cfset QUERIES.providers = CreateObject("component", "cfc.utilities").funcGetDLProviders() />                                
                                <cfif QUERIES.elder.StaffSignature eq "">
                                    <cfset staffSignDate = dateFormat(now(), 'mm/dd/yyyy')/>
                                <cfelse>
                                    <cfset staffSignDate = dateFormat(QUERIES.elder.StaffSignatureDate, 'mm/dd/yyyy')/>
                                </cfif>
                                <cfselect name="StaffSignature">
                                    <option value="-1" ></option>
                                    <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                        <option value="#QUERIES.providers[i].RosettaID#" <cfif QUERIES.elder.StaffSignature eq QUERIES.providers[i].RosettaID>selected=selected</cfif>>
                                            #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#
                                        </option>
                                    </cfloop>
                                </cfselect>
                                <cfinput type="text" id="StaffSignatureDate" name="StaffSignatureDate" value="#staffSignDate#" />
                            </td>
                            <td>
                            	<div id="SupervisorSignature">Supervisor Signature: </div>
                                <cfset UTILS.supervisor = CreateObject("component", "cfc.utilities").funcIsSupervisor(CGI.AUTH_USER)/>
								<cfif UTILS.supervisor.RecordCount gt 0 >
									<cfif QUERIES.elder.SupervisorSignature neq "">                           
                                        <!--- request from customer to have this installed?! --->
                                        <cfselect name="SupervisorSignature">
                                            <option value="-1" > </option>
                                            <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                                <cfif trim(QUERIES.providers[i].LastName) eq "Soper" OR 
                                                        trim(QUERIES.providers[i].LastName) eq "Bauman" OR 
                                                            trim(QUERIES.providers[i].LastName) eq "Osterback">
                                                    <option value="#QUERIES.providers[i].RosettaID#" 
                                                        <cfif QUERIES.elder.SupervisorSignature eq QUERIES.providers[i].RosettaID>selected="selected"</cfif>>
                                                        #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#
                                                    </option>                                                  
                                                </cfif>
                                            </cfloop>
                                        </cfselect>
                                        <cfinput type="text" id="SupervisorSignatureDate" name="SupervisorSignatureDate" value="#dateFormat(QUERIES.elder.SupervisorSignatureDate, 'mm/dd/yyyy')#" />
                                    <cfelse>
                                       <!--- request from customer to have this installed?! --->
                                        <cfselect name="SupervisorSignature">
                                            <option value="-1" > </option>
                                            <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                                <cfif trim(QUERIES.providers[i].LastName) eq "Soper" OR 
                                                        trim(QUERIES.providers[i].LastName) eq "Bauman" OR 
                                                            trim(QUERIES.providers[i].LastName) eq "Osterback">
                                                    <option value="#QUERIES.providers[i].RosettaID#" 
                                                        <cfif QUERIES.elder.SupervisorSignature eq QUERIES.providers[i].RosettaID>selected="selected"</cfif>>
                                                        #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#
                                                    </option>                                                  
                                                </cfif>
                                            </cfloop>
                                        </cfselect>                                        
                                       <cfinput type="text" id="SupervisorSignatureDate" name="SupervisorSignatureDate" value="#dateFormat(now(), 'mm/dd/yyyy')#" />
                                    </cfif>
                                    
                                <cfelseif UTILS.supervisor.RecordCount eq 0 AND QUERIES.elder.SupervisorSignature neq "">
                                    <!--- request from customer to have this installed?! --->
									<cfselect name="SupervisorSignature">
									    <option value="-1" > </option>
									    <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
									        <cfif trim(QUERIES.providers[i].LastName) eq "Soper" OR 
									                trim(QUERIES.providers[i].LastName) eq "Bauman" OR 
									                    trim(QUERIES.providers[i].LastName) eq "Osterback">
									            <option value="#QUERIES.providers[i].RosettaID#" 
									                <cfif QUERIES.elder.SupervisorSignature eq QUERIES.providers[i].RosettaID>selected="selected"</cfif>>
									                #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#
									            </option>                                                  
									        </cfif>
									    </cfloop>
									</cfselect>
                                    <cfinput type="text" id="SupervisorSignatureDate" name="SupervisorSignatureDate" value="#dateFormat(QUERIES.elder.SupervisorSignatureDate, 'mm/dd/yyyy')#" />                     
                                <cfelse>
                                	Your are not a supervisor
                                    <cfinput type="hidden" id="SupervisorSignature" name="SupervisorSignature" size="15" value="" />
                                    <cfinput type="hidden" id="SupervisorSignatureDate" name="SupervisorSignatureDate" value="" />
                                </cfif>
                            </td>
                        </tr>
                    </tbody>
                </table>
               <!--- inner table Signatures--->
            </td>
        </tr>
    </tbody>
</table> 

<table width="99%" cellpadding="2" cellspacing="0" id="intake">
<tr>
    <td width="60%">
        <cfinput type="button" id="save_intake" name="save_intake" value="Save Intake"  >
        <cfset UTILS.supervisor = CreateObject("component", "cfc.utilities").funcIsSupervisor(CGI.AUTH_USER)/>
        <cfif UTILS.supervisor.RecordCount gt 0 >
           <!--- <cfinput type="button" id="update_intake" name="update_intake"  value="Edit Intake" />--->
            <cfinput type="button" id="delete_intake" name="delete_intake"  value="Delete Intake" />
         </cfif>
    </td>
    <td  valign="bottom">
        
        <div id="Pagination_bottom" class="pagination">
        <span style="font-weight:normal">Pages</span>                   
        <a href="##" class="current" id="page1_bottom">1</a>
        <a href="##" id="page2_bottom">2</a>
        <a href="##" id="page3_bottom">3</a>
        <a href="##" id="page4_bottom">4</a>
        </div>
    </td>
</tr>
</table>
<!---this holds the logged in user for data submition.--->
<input type="hidden" id="signer" value="#CGI.AUTH_USER#" />

<!---this holds todays date for data submition.--->
<input type="hidden" id="sign_date" value="#dateFormat(now(),'mm/dd/yyyy')#" />
</cfform>

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>